Gzip is a kind of network data compression transmission technique, can let our bandwidth save about 70%, can greatly speed up the page opening speed, not only benefit the user experience, also can save a lot of Bandwidth. General apache, Nginx and so on in the configuration file can open the Gzip service. Let's talk about how to turn on the gzip compression service in the PHP Web program:
Page crawling is often used in PHP projects to capture various encoding and compressed page content. two common problems may occur during page crawling.
1. the page encoding is inconsistent. the local code is UTF-8, and the captured page is gbk, leading to garbled characters.
2. Some websites use the compression technology to compress the pages and gzip the pages, which causes exceptions when capturing results.
After searching for related solution
A class just found online. Click to download a class file (zip compressed file, 2.25 K) $ znewPHPZip (); create a zip class Method 1: mongoz->zip("","out1.zip & quot ;); method 2: Add all files under the current directory and
$ ZnewPHPZip (); // Create a zip class. Method 1: export z->zip(,out1.zip); // add all files under the current directory and subdirectory. Method 2: Export
$ Z = new PHPZip (); // Create a zip class
Method 1:
$ Z-> Zip ("", "out1.zip"); // add
(the JPEG processing color is only true color and grayscale ). Due to its high compression ratio, JPEG is widely used in multimedia and network programs. For example, one of the image formats selected in HTML syntax is JPEG (another is GIF ), this is obvious, because the bandwidth of the network is very valuable, it is necessary to choose a file format with a high comp
A class just found online. Click to download a class file (zip compressed file, 2.25 K)$ Z = new PHPZip (); // Create a zip classMethod 1:$ Z-> Zip ("", "out1.zip"); // add all files under the current directory and subdirectoryMethod 2:Using
Webmaster tool (Google Webmaster tools), sitemap.xml.gz is submitted directly as a sitemap. While these benefits are not limited to static content, PHP dynamic pages and other dynamically generated content can be compressed by using the Apache compression module, plus other performance tuning mechanisms and the corresponding server-side caching rules, which can greatly improve the performance of the site. Therefore, for PHP
/* * @brief compress picture @Fire * * @param originimage Original image * @param pc is pixel compressed * @param the maximum pixel length and width of maxpixel after compression; Pc=no, this parameter is invalid. * @param JC is JPEG compressed * @param maxkb Picture maximum volume, in kilobytes, this parameter is invalid when Jc=no. * * @return return picture of NSData */-(nsdata*) Compressimage: (uiimage*) originimage pixelcompress: (BOOL) PC Maxpix
function, so that developers see an uncompressed state, but when visitors visit, the service side of the program to compress the HTML page, clear comment tags, line breaks, spaces, tabs and so on to reduce the HTML volume purposes. If you frequently visit higrid.net, right-click on the HTML source code, you will see this HTML source code has been compressed processing. Including the free content management system provided by Higrid.net, the output is compressed HTML, stripped of whitespace, lin
[Translated from mos] a thorough understanding of rman compression, mos Article rman Compression
A thorough understanding of rman CompressionSource:A Complete Understanding of RMAN Compression (Document ID 563427.1)
Applicable:Oracle Database-Enterprise Edition-Version 8.1.7.4 to 11.2.0.3 [Release 8.1.7 to 11.2]Information in this document applies to any platform
You can browse the bold section first
One, the common compression file
*.zip | Zip program compresses packaged files; (very common, but because it does not contain document name encoding information, cross-platform may be garbled)*.rar | The WinRAR process compresses packaged files; (Common on Windows, but commercial software.) )*.gz | Gzip program compressed files; (Linux is currently the most widely used
This article mainly describes the new feature of DB2 V9.7 index compression, Which is used correctly. DB2 V9.1 database introduces the row compression technology. When the data volume in our system is large, when I/O requirements exceed the capacity provided by the disk system, that is, I/O becomes the bottleneck of the system), row compression can effectively re
The Sequncefile compression type (Compression type) is divided into three none,record,block, specified by the configuration item Io.seqfile.compression.type: None, do not compress records is not compressed RECORD, Compress values only, each separately. Each record is compressed once for value BLOCK, Compress sequences of records together in blocks. Block compression
I. SummaryThis article summarizes how to enable gzip compression for Web sites that are hosted by IIS, reducing the size of the Web network transfer and increasing the speed at which users display pages.Two. Preface.The knowledge points of this paper are collected from the Internet, mainly from the Chinese wiki. Gzip is a key item when using YSlow to detect which optimizations are enabled on the site. Starting GIP
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.